package com.gzwh.v1.sysapi.server.dinner.impl;

import com.gzwh.v1.sysapi.dao.dinner.AskTypeMapper;
import com.gzwh.v1.sysapi.entity.dinner.AskType;
import com.gzwh.v1.sysapi.server.dinner.AskTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AskTypeServiceImpl implements AskTypeService {

    @Autowired
    AskTypeMapper askTypeMapper;

    /**
     * 通过实体类信息，向数据库插入一条记录
     * @param askType
     * @return
     */
    @Override
    public int insertAskType(AskType askType) {
        return askTypeMapper.insertAskType(askType);
    }

    /**
     * 通过appid ，向数据库查询列表数据
     * @param appid
     * @return
     */
    @Override
    public List<AskType> getAsktype(Long appid) {
        return askTypeMapper.getAskType(appid);
    }

    @Override
    public int deleteAskType(Long appid) {
        return askTypeMapper.deleteAskType(appid);
    }
}
